<?php
/**
* @package Pages-and-Items (com_pi_pages_and_items)
* @version 1.5.7
* @copyright Copyright (C) 2006-2010 Carsten Engel. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @author http://www.pages-and-items.com
*/

//no direct access
if(!defined('_VALID_MOS') && !defined('_JEXEC')){
	die('Restricted access');
}

if($class_pi->user_type!='Super Administrator'){
	echo "<script> alert('you need to be logged in as a super administrator to edit the Pages-and-Items config.'); window.history.go(-1); </script>";
	exit();
}

?>
<script src="../includes/js/overlib_mini.js" language="JavaScript" type="text/javascript"></script>
<script src="components/com_pi_pages_and_items/javascript/tab_cookies.js" language="JavaScript" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="components/com_pi_pages_and_items/css/pages_and_items3.css" />

<script language="JavaScript" type="text/javascript">

function submitbutton(pressbutton) {
	if (pressbutton == 'config_save') {
		submitform('config_save');
	}
	if (pressbutton == 'config_apply') {
		document.getElementById('sub_task').value = 'apply';
		submitform('config_save');
	}		
	if (pressbutton == 'cancel') {
		document.location.href = 'index2.php?option=com_pi_pages_and_items';		
	}
}

<?php

$tab = $class_pi->get_var('tab', false);	

if(!$tab){	
	echo "cookie_value = getCookie('pi_tabs');"."\n";	
	echo "if(cookie_value!=null){"."\n";		
		echo "current_tab = cookie_value;"."\n";
	echo "}else{"."\n";		
		echo "setCookie('pi_tabs', 'general', '', '', '', '');"."\n";
		echo "current_tab = 'general';"."\n";
	echo "}"."\n";
}else{
	echo "setCookie('pi_tabs', '".$tab."', '', '', '', '');"."\n";
	echo "current_tab = '".$tab."';"."\n";
}

?>

function get_tab(tab){
	if(tab!=current_tab){
		new_tab = 'tab_'+tab;	
		document.getElementById(new_tab).className = 'on';
		old_tab = 'tab_'+current_tab;	
		document.getElementById(old_tab).className = 'none';
		document.getElementById(tab).style.display = 'block';	
		document.getElementById(current_tab).style.display = 'none';
		current_tab = tab;
		setCookie('pi_tabs', tab, '', '', '', '');
	}
}

function pi_config_menu_init(){
	current_tab_name = 'tab_'+current_tab;	
	document.getElementById(current_tab_name).className = 'on';
	document.getElementById(current_tab).style.display = 'block';	
}

if(window.addEventListener)window.addEventListener("load",pi_config_menu_init,false);else if(window.attachEvent)window.attachEvent("onload",pi_config_menu_init);

</script>
<?php

//give headers in Joomla 1.5 a bit more spunk
$class_pi->spunk_up_headers_1_5();

?>
<div style="text-align: left;">	
	<div style="float:right;width: 100px;">
		<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/nl_NL/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHiAYJKoZIhvcNAQcEoIIHeTCCB3UCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYB0GVwPgWgXw3MFovX9YOxZnjJ4/4SliXZ6A7lZjzSH/3uLFxiJ9d3JrP7OZfz/rtAqu4gt/FgvPD9QY+FgU3IpFTpzX4nhK0yzozJyFKpth6IKCX/D/+Pkh86R9eZzPMixT443kBq8p0oYcXi4pfF147N0Rui3bhaxxE/PsBRS8DELMAkGBSsOAwIaBQAwggEEBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECGoQ6Lk34n3BgIHgrPNeWVPuqA9vxpd3BAKo2SFy52Vo7TBbmrMaZN84tI5c/Jj7jsFnRMpwsN9Pia0Jctl38aCv+ZMWyQZp9m8G6Dhl/d43Ivh7SlME5uMHTeg5OrYzDgPsT7I3IJUDXbJwZeQq8HZFgkm/79oKtlXXTlZRK4GHHm6GCSyA2V2QQb3PSio+cshyOBxf5MI6yLC3/A4AJ6ES5VjyJralBZIxLOyRDGT89hx+wL29b+f64t2TSMFxFF/4go7Evrt9L0QTXxQWGXGJStPA/MtvcyaUvvyJAixXOqqTadrfBaheTkCgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1WhcNMzUwMjEzMTAxMzE1WjCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMFHTt38RMxLXJyO2SmS+Ndl72T7oKJ4u4uw+6awntALWh03PewmIJuzbALScsTS4sZoS1fKciBGoh11gIfHzylvkdNe/hJl66/RGqrj5rFb08sAABNTzDTiqqNpJeBsYs/c2aiGozptX2RlnBktH+SUNpAajW724Nv2Wvhif6sFAgMBAAGjge4wgeswHQYDVR0OBBYEFJaffLvGbxe9WT9S1wob7BDWZJRrMIG7BgNVHSMEgbMwgbCAFJaffLvGbxe9WT9S1wob7BDWZJRroYGUpIGRMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wODA3MTgxODA0MDFaMCMGCSqGSIb3DQEJBDEWBBQpJdzj+GjtsfT+rS4Qe6pY5Uob+jANBgkqhkiG9w0BAQEFAASBgAvOmBTwxnBsDyHdyQKoAgjjbrNrHO1E9SXEM2znLT1k1PAJE4G7EBTJZbGh26iL54wPXyIvrj/y4y38Fq9ZoebWgfxTgtPEetgy6gxGLz12ZDoC/3ycxTZ1lwrHc3DeUtjasjL1Jm9OxMhUnPduP06pvgh+HoG+I7V/S1dl7AWQ-----END PKCS7-----
">
		</form>
	</div>
	<form name="adminForm" method="post" action="">
		<input type="hidden" name="option" value="com_pi_pages_and_items" />
		<input type="hidden" name="task" value="config_save" />	
		<input type="hidden" name="sub_task" id="sub_task" value="" />		
		<a href="index2.php?option=com_pi_pages_and_items">pages and items</a> > <?php echo _pi_lang_config; ?>
		<h2>Pages and Items <?php echo _pi_lang_config; ?></h2>			
		<ul id="pi_menu">
			<li><a id="tab_general" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('general');"><span><?php echo _pi_lang_general; ?></span></a></li>
			<li><a id="tab_admin-user-access" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('admin-user-access');"><span>Admin-User-Access</span></a></li>			
			<li><a id="tab_itemtypes" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('itemtypes');"><span><?php echo _pi_lang_itemtypes; ?></span></a></li>			
			<li><a id="tab_items" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('items');"><span><?php echo _pi_lang_items; ?></span></a></li>
			<li><a id="tab_new_item" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('new_item');"><span><?php echo _pi_lang_new_item; ?></span></a></li>
			<li><a id="tab_images" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('images');"><span><?php echo _pi_lang_images; ?></span></a></li>
			<li><a id="tab_menus" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('menus');"><span><?php echo _pi_lang_menus; ?></span></a></li>
			<li><a id="tab_links_and_downloads" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('links_and_downloads');"><span><?php echo _pi_lang_linksdownloadpopup; ?></span></a></li>
			<li><a id="tab_sections" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('sections');"><span><?php echo _pi_lang_sections; ?></span></a></li>
			<li><a id="tab_pages" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('pages');"><span><?php echo _pi_lang_pages; ?></span></a></li>
			<li><a id="tab_new_page" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('new_page');"><span><?php echo _pi_lang_new_page; ?></span></a></li>
			<li><a id="tab_credits" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('credits');"><span><?php echo _pi_lang_credits; ?></span></a></li>
			<li><a id="tab_joomfish" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('joomfish');"><span>Joom!Fish</span></a></li>	
			<li><a id="tab_acesef" onfocus="if(this.blur)this.blur();" href="javascript:get_tab('acesef');"><span>Acesef</span></a></li>			
		</ul>		
		<div id="general">
		<table class="adminlist" width="100%">			
			<tr>
				<th colspan="2">					
					<?php echo _pi_lang_general; ?>
				</th>
			</tr>			
			<tr>		
				<td>
					<?php echo _pi_lang_statusmambot; ?>
				</td>
				<td>
					<?php 
					if($class_pi->mambot){
						echo '<span style="color: #5F9E30;">'._pi_lang_mambotinstalled.'</span>';
					}else{
						echo '<span style="color: red;">'._pi_lang_nomambotinstalled.'</span>';
					}
					//check if bot is published
					$bot_published = false;
					if( defined('_JEXEC') ){
						//joomla 1.5
						$table_name = '#__plugins';
					}else{
						//joomla 1.0.x
						$table_name = '#__mambots';
					}
					$class_pi->db->setQuery("SELECT published FROM $table_name WHERE name='Pages and Items' AND folder='content' LIMIT 1");
					$rows = $class_pi->db->loadObjectList();
					$bot_published = false;
					foreach($rows as $row){
						$bot_published = true;
					}							
					if($bot_published){
						echo '<div style="color: #5F9E30;">'._pi_lang_ispublished.'</div>';
					}else{
						echo '<div style="color: red;">'._pi_lang_isnotpublished.'</div>';
					}
					?>					
				</td>
			</tr>			
			<tr>		
				<td>
					<?php echo _pi_lang_status_module; ?>
				</td>
				<td>
					<?php 
					if($class_pi->module_installed){
						echo '<div style="color: #5F9E30;">'._pi_lang_mod_installed.'</div>';		
					}else{
						echo '<div style="color: red;">'._pi_lang_mod_not_installed.'</div>';
					}
					//check if mudule is published and title is displayed
					$class_pi->db->setQuery("SELECT id, published, showtitle FROM #__modules WHERE module='mod_pages_and_items' LIMIT 1");
					$rows = $class_pi->db->loadObjectList();
					$module_published = false;
					$module_id = false;
					if(count($rows)){
						$row = $rows[0];
						$module_published = $row->published;
						$module_id = $row->id;
					}
					if($module_published){
						echo '<div style="color: #5F9E30;">'._pi_lang_mod_published.'</div>';		
					}else{
						echo '<div style="color: red;">'._pi_lang_mod_not_published.'</div>';
					}					
					$module_page_setting = false;
					if($module_id){
						//check if module is assigned to all pages
						$class_pi->db->setQuery("SELECT menuid FROM #__modules_menu WHERE moduleid='$module_id' LIMIT 1");
						$rows = $class_pi->db->loadObjectList();
						$row = $rows[0];
						if($row->menuid==0 && count($rows)){
							$module_page_setting = true;
						}
					}				
					if($module_page_setting){
						echo '<div style="color: #5F9E30;">'._pi_lang_mod_show_on_all_pages.'</div>';		
					}else{
						echo '<div style="color: red;">'._pi_lang_mod_not_show_on_all_pages.'</div>';
					}	
					?>						
				</td>
			</tr>
			<tr>		
				<td>
					<span class="editlinktip"><span onMouseOver="return overlib('<?php echo _pi_lang_use_pi_frontend_editting_tip; ?>', CAPTION, '<?php echo _pi_lang_use_pi_frontend_editting; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_use_pi_frontend_editting; ?></span></span>		
				</td>
				<td>
					<input type="checkbox" name="use_pi_frontend_editting" value="true" <?php if($class_pi->pi_config['use_pi_frontend_editting']){echo 'checked="checked"';} ?> />	
				</td>
			</tr>			
			<tr>		
				<td>
					<?php echo _pi_lang_language; ?>
				</td>
				<td>
					<select name="language">
					<?php						
						if( defined('_JEXEC') ){
							//joomla 1.5
							jimport( 'joomla.filesystem.folder' );
							$languages = JFolder::files(dirname(__FILE__).'/../language');
						}else{
							//joomla 1.0.x							
							$languages = mosReadDirectory(dirname(__FILE__).'/../language');
						}						
						foreach($languages as $language){
							if($language!='index.html'){
								$language = str_replace('.php','',$language);
								$selected = '';
								if($language==$class_pi->pi_config['language']){
									$selected = ' selected="selected"';
								}
								echo '<option value="'.$language.'"'.$selected.'>'.$language.'</option>';
							}
						}
					?>
					</select>
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_version; ?>	
				</td>
				<td>
					<?php echo $class_pi->version; ?> 
				</td>
			</tr>			
			</table>
			</div>
			<div id="admin-user-access">
			<table   class="adminlist" width="100%">				
			<tr>
				<th colspan="2">					
					Admin-User-Access
				</th>	
			</tr>
			<tr>
				<td colspan="2">				
					<?php echo _pi_lang_useraccessinfo; ?>
					<p><a href="http://www.pages-and-items.com/admin-user-access/" target="_blank">www.pages-and-items.com/admin-user-access</a>
					</p>					
					<img src="components/com_pi_pages_and_items/images/aua.jpg" alt="admin user access" style="border: 1px solid #000;" />
				</td>
			</tr>			
			<tr>		
				<td>
					<?php echo _pi_lang_checkuseraccess; ?>
				</td>
				<td>
					<?php
						if(file_exists(dirname(__FILE__).'/../../com_pi_admin_user_access/admin.pi_admin_user_access.php')){
							echo '<span style="color: #5F9E30;">'._pi_lang_uainstalled.'</span>';
						}else{
							echo '<span style="color: red;">'._pi_lang_nouainstalled.'</span>';
						}
					?>
				</td>
			</tr>
			<tr>		
				<td>
					<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_useuseraccess_tip; ?>', CAPTION, '<?php echo _pi_lang_useuseraccess; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_useuseraccess; ?></span>
				</td>
				<td>
					<input type="checkbox" name="use_user_access_component" value="true" <?php if($class_pi->pi_config['use_user_access_component']){echo 'checked="checked"';} ?> />
				</td>
			</tr>			
			</table>
			</div>			
			<div id="itemtypes">
			<table  class="adminlist" width="100%">			
			<tr>
				<th colspan="2">					
					<?php echo _pi_lang_itemtypes; ?>
				</th>
			</tr>
			<tr>
				<td>&nbsp;
				</td>
				<td style="text-align: right;"><a href="http://www.pages-and-items.com/itemtypes" target="_blank"><?php echo _pi_lang_get_more_itemtypes; ?></a>&nbsp;&nbsp;&nbsp;<input type="button" value="<?php echo _pi_lang_create_new_itemtype; ?>" onclick="document.location.href='index2.php?option=com_pi_pages_and_items&task=config_custom_itemtype&sub_task=new';" />
				</td>
			</tr>
			<tr>		
				<td class="b">
					<?php echo _pi_lang_alias; ?>			
				</td>
				<td class="b">					
					<span class="sidestep">
						<?php echo _pi_lang_published; ?>
					</span>
					<span class="sidestep">
					<?php echo _pi_lang_name; ?>
					</span>
					<span class="sidestep">
					<?php echo _pi_lang_type; ?>
					</span>	
					<?php echo _pi_lang_config; ?>								
				</td>
			</tr>				
					<?php
					
						//make a new array from installed itemtypes	
						$installed_itemtypes = array();
						if(file_exists(dirname(__FILE__).'/../../../../'.$class_pi->plugin_dir.'/pages_and_items/itemtypes/')){
							$itemtype_dir = dirname(__FILE__).'/../../../../'.$class_pi->plugin_dir.'/pages_and_items/itemtypes/';					
							if( defined('_JEXEC') ){
								//joomla 1.5
								jimport( 'joomla.filesystem.folder' );
								$dir_itemtypes = JFolder::folders($itemtype_dir);
							}else{
								//joomla 1.0.x							
								$dir_itemtypes = mosReadDirectory($itemtype_dir);
							}												
							$installed_itemtypes = array();											
							foreach($dir_itemtypes as $itemtype){	
								array_push($installed_itemtypes, $itemtype);
							}
						}
						
						//add 'text' and 'html' and 'other_item' to array as those are itemtypes which are embedded in Pages-and-Items
						array_push($installed_itemtypes, 'text');
						array_push($installed_itemtypes, 'html');	
						array_push($installed_itemtypes, 'other_item');						
						
						//make array with extra column for alias and custom-or-not
						$all_itemtypes = array();
						foreach ($installed_itemtypes as $itemtype) {							
							//$itemtype_array = array($itemtype, $class_pi->translate_item_type($itemtype), 0);
							$itemtype_array = array($itemtype, $itemtype, 0);
							array_push($all_itemtypes, $itemtype_array);	  
						}	
						
						//get customitemtypes
						$class_pi->db->setQuery("SELECT id, name FROM #__pi_customitemtypes"  );
						$custom_itemypes = $class_pi->db->loadObjectList();
						foreach($custom_itemypes as $custom_itemype){	
							//echo $custom_itemype->name.'<br>';
							$itemtype_array = array($custom_itemype->name, $custom_itemype->name, $custom_itemype->id);	
							array_push($all_itemtypes, $itemtype_array);
						}	
						
						//print_r($all_itemtypes);				
						
						//order itemtype-array on language-specific alias
						foreach ($all_itemtypes as $key => $row){
							$order[$key]  = strtolower($row[1]);  	   
						}
						array_multisort($order, SORT_ASC, $all_itemtypes);
												
						//display itemtype list						
						foreach($all_itemtypes as $itemtype){
							echo '<tr>';
							echo '<td>'.$itemtype[1].'</td>';
							$checked = '';
							$custom_itemtype_name = 'custom_'.$itemtype[2];
							if(in_array($itemtype[0], $class_pi->itemtypes) || in_array($custom_itemtype_name, $class_pi->itemtypes)){
								$checked = ' checked="checked"';
							}
							$config = '-';
							if($itemtype[2]){
								$config = '<a href="index2.php?option=com_pi_pages_and_items&task=config_custom_itemtype&type_id='.$itemtype[2].'">'._pi_lang_config.'</a>';
							//}else if(file_exists(dirname(__FILE__).'/../../com_pi_itemtype_'.$itemtype[0].'/admin/config.php')){							
							}else if(file_exists(dirname(__FILE__).'/../../../../'.$class_pi->plugin_dir.'/pages_and_items/itemtypes/'.$itemtype[0].'/admin/config.php')){							
								$config = '<a href="index2.php?option=com_pi_pages_and_items&task=config_itemtype&item_type='.$itemtype[0].'">'._pi_lang_config.'</a>';
							}
							echo '<td><span class="sidestep"><input type="checkbox" name="itemtypes[';
							if($itemtype[2]){
								echo 'custom_'.$itemtype[2];
							}else{
								echo $itemtype[0];
							}
							echo ']" value="1"'.$checked.' /></span><span class="sidestep">';
							if($itemtype[2]){
								echo 'custom_'.$itemtype[2];
							}else{
								echo $itemtype[0];
							}
							echo '</span>';
							echo '<span class="sidestep">';
							if($itemtype[2]){
								echo _pi_lang_customitemtype;
							}else if($itemtype[0]=='html' || $itemtype[0]=='text' || $itemtype[0]=='other_item'){
								echo _pi_lang_coreitemtype;
							}else{
								echo _pi_lang_itemtype_plugin;
							}
							echo '</span>';
							echo $config;
							echo '</td>';
							echo '</tr>';
						}						
						
					?>		
			</table>
			</div>			
			<div id="items">
			<table  class="adminlist" width="100%">				
			<tr>
				<th colspan="3">					
					<?php echo _pi_lang_items; ?>	
				</th>
			</tr>			
			<tr>		
				<td width="200">
					<?php echo _pi_lang_itemmenu; ?>				
				</td>
				<td colspan="2">
					<label><input type="radio" class="radio" name="item_menu" value="tabs" <?php if($class_pi->pi_config['item_menu']=='tabs'){ echo "checked=\"checked\""; }?> /><?php echo _pi_lang_itemmenutabs; ?></label><br />
	<label><input type="radio" class="radio" name="item_menu" value="slide" <?php if($class_pi->pi_config['item_menu']=='slide'){ echo "checked=\"checked\""; }?>  /><?php echo _pi_lang_itemmenuslide; ?></label>
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_plugin_syntax_cheatcheat; ?>				
				</td>
				<td>
					<textarea name="plugin_syntax_cheatcheat" cols="60" rows="3" style="width: 400px;"><?php echo $class_pi->pi_config['plugin_syntax_cheatcheat']; ?></textarea> 
				</td>
				<td><?php echo _pi_lang_plugin_syntax_cheatcheat_info; ?><br /><?php echo _pi_lang_example; ?><br />
				<img src="components/com_pi_pages_and_items/images/syntax.gif" alt="example syntax cheatsheet" style="border: 1px solid #000;" />
				</td>
			</tr>	
			<tr>		
				<td>
					<?php echo _pi_lang_allow_authors_to_publish; ?>				
				</td>
				<td>
					<input type="checkbox" name="allow_authors_to_publish" value="true" <?php if($class_pi->pi_config['allow_authors_to_publish']){echo 'checked="checked"';} ?> />
				</td>
				<td>
					<?php echo _pi_lang_allow_authors_to_publish_info.'.'; ?>	
				</td>
			</tr>	
			<tr>		
				<td>
					<?php echo _pi_lang_allow_editors_to_publish; ?>				
				</td>
				<td>
					<input type="checkbox" name="allow_editors_to_publish" value="true" <?php if($class_pi->pi_config['allow_editors_to_publish']){echo 'checked="checked"';} ?> />
				</td>
				<td>
					<?php echo _pi_lang_allow_editors_to_publish_info.'.'; ?>	
				</td>
			</tr>	
			<tr>		
				<td>
					<?php echo _pi_lang_item_save_redirect; ?>				
				</td>
				<td colspan="2">
					<label><input name="item_save_redirect" type="radio" value="item" class="radio" <?php if($class_pi->pi_config['item_save_redirect']=='item'){echo ' checked="checked"';} ?> /><?php echo _pi_lang_item_save_redirect_item; ?></label><br />
					<label><input name="item_save_redirect" type="radio" value="category_blog" class="radio" <?php if($class_pi->pi_config['item_save_redirect']=='category_blog'){echo ' checked="checked"';} ?> /><?php echo _pi_lang_item_save_redirect_category_blog; ?></label><br />
					<label><input name="item_save_redirect" type="radio" value="url" class="radio" <?php if($class_pi->pi_config['item_save_redirect']=='url'){echo ' checked="checked"';} ?> /><?php echo _pi_lang_item_save_redirect_url; ?>.</label>
					  <input type="text" name="item_save_redirect_url" style="width: 300px;" value="<?php echo $class_pi->pi_config['item_save_redirect_url']; ?>" />  <?php echo _pi_lang_example; ?>:  'index.php?option=com_content&view=frontpage' 
				</td>				
			</tr>	
			<tr>		
				<td>
					<?php echo _pi_lang_make_article_alias_unique; ?>				
				</td>
				<td colspan="2">
					<input type="checkbox" name="make_article_alias_unique" value="true" <?php if($class_pi->pi_config['make_article_alias_unique']){echo 'checked="checked"';} ?> /> <?php echo _pi_lang_make_article_alias_unique_info.'.'; ?>	
				</td>				
			</tr>	
			<tr>		
				<td>
					<?php echo _pi_lang_date_format; ?>				
				</td>
				<td colspan="2">
					<?php
					//$date_format = '';
					//if(isset($class_pi->pi_config['date_format'])){
						$date_format = trim($class_pi->pi_config['date_format']);
						//echo $date_format;
						//echo $selected;
					//}
					$option_selected = ' selected="selected"';
					?>
					<select name="date_format" class="inputbox" size="1">
						
						<option value="%Y-%m-%d" <?php if($date_format==='%Y-%m-%d'){echo $option_selected;} ?>>yyyy-mm-dd</option>
						<option value="%d-%m-%Y" <?php if($date_format==='%d-%m-%Y'){echo $option_selected;} ?>>dd-mm-yyyy</option>
						
						<option value="%d-%m-%y" <?php if($date_format==='%d-%m-%y'){echo $option_selected;} ?>>dd-mm-yy</option>
						<option value="%y-%m-%d" <?php if($date_format==='%y-%m-%d'){echo $option_selected;} ?>>yy-mm-dd</option>
						
						<option value="%m-%d-%y" <?php if($date_format==='%m-%d-%y'){echo $option_selected;} ?>>mm-dd-yy</option>
						<option value="%m-%d-%Y" <?php if($date_format==='%m-%d-%Y'){echo $option_selected;} ?>>mm-dd-yyyy</option>
						
					</select>					
					<?php echo _pi_lang_date_use; ?>	
				</td>				
			</tr>					
			<tr>
				<td colspan="3">&nbsp;
					
				</td>
			</tr>
			<tr>
				<th>					
					<?php echo _pi_lang_items_properties; ?>	
				</th>
				<th colspan="2">
					<?php echo _pi_lang_display_property_when_editting; ?>
				</th>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_publish; ?>				
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_publish" value="true" <?php if($class_pi->pi_config['item_props_publish']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_alias; ?>				
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_alias" value="true" <?php if($class_pi->pi_config['item_props_alias']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_showfrontpage; ?>			
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_show_frontpage_option" value="true" <?php if($class_pi->pi_config['item_show_frontpage_option']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_show_title; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_title" value="true" <?php if($class_pi->pi_config['item_props_title']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_access; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_access" value="true" <?php if($class_pi->pi_config['item_props_access']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_author_alias; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_author_alias" value="true" <?php if($class_pi->pi_config['item_props_author_alias']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_author; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_author" value="true" <?php if($class_pi->pi_config['item_props_author']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_created_date; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_created_date" value="true" <?php if($class_pi->pi_config['item_props_created_date']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_start; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_publish_up" value="true" <?php if($class_pi->pi_config['item_props_publish_up']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_stop; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_publish_down" value="true" <?php if($class_pi->pi_config['item_props_publish_down']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_hits; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_hits" value="true" <?php if($class_pi->pi_config['item_props_hits']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_version; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_version" value="true" <?php if($class_pi->pi_config['item_props_version']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_created; ?>	
				</td>					
				<td colspan="2">				
					<input type="checkbox" name="item_props_created" value="true" <?php if($class_pi->pi_config['item_props_created']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_modified; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_modified" value="true" <?php if($class_pi->pi_config['item_props_modified']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_item_id; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_item_id" value="true" <?php if($class_pi->pi_config['item_props_item_id']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_category_id; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_category_id" value="true" <?php if($class_pi->pi_config['item_props_category_id']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_section_id; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_section_id" value="true" <?php if($class_pi->pi_config['item_props_section_id']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_display_other_items_instances; ?>						
				</td>
				<td>
					<input type="checkbox" name="item_props_other_items" value="true" <?php if($class_pi->pi_config['item_props_other_items']){echo 'checked="checked"';} ?> />	
				</td>
				<td><?php echo _pi_lang_other_item_info.'<br />'; echo _pi_lang_display_other_items_instances_info; ?>	
				</td>
			</tr>			
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_show_title; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_show_title" value="true" <?php if($class_pi->pi_config['item_props_show_title']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_linked_titles; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_linked_titles" value="true" <?php if($class_pi->pi_config['item_props_linked_titles']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_intro; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_intro" value="true" <?php if($class_pi->pi_config['item_props_intro']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_section; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_section" value="true" <?php if($class_pi->pi_config['item_props_section']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_section_link; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_section_link" value="true" <?php if($class_pi->pi_config['item_props_section_link']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_category; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_category" value="true" <?php if($class_pi->pi_config['item_props_category']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_category_link; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_category_link" value="true" <?php if($class_pi->pi_config['item_props_category_link']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_rating; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_rating" value="true" <?php if($class_pi->pi_config['item_props_rating']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_author; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_author_names" value="true" <?php if($class_pi->pi_config['item_props_author_names']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_date; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_date" value="true" <?php if($class_pi->pi_config['item_props_date']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_mod_date; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_mod_date" value="true" <?php if($class_pi->pi_config['item_props_mod_date']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_pdf_link; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_pdf_link" value="true" <?php if($class_pi->pi_config['item_props_pdf_link']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_print_link; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_print_link" value="true" <?php if($class_pi->pi_config['item_props_print_link']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_mail_link; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_mail_link" value="true" <?php if($class_pi->pi_config['item_props_mail_link']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_language; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_language" value="true" <?php if($class_pi->pi_config['item_props_language']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_key; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_key" value="true" <?php if($class_pi->pi_config['item_props_key']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_readmore2; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_readmore" value="true" <?php if($class_pi->pi_config['item_props_readmore']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_description; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_description" value="true" <?php if($class_pi->pi_config['item_props_description']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_keywords; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_keywords" value="true" <?php if($class_pi->pi_config['item_props_keywords']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_robots; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_robots" value="true" <?php if($class_pi->pi_config['item_props_robots']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_metaauthor_tip; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_metaauthor" value="true" <?php if($class_pi->pi_config['item_props_metaauthor']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>&nbsp;
									
				</td>
				<td colspan="2">
					<?php echo _pi_lang_config_more_with_aua.' <a href="http://www.pages-and-items.com/admin-user-access/" target="_blank">Admin-User-Access</a> (<a href="http://www.pages-and-items.com/screenshots_admin_user_access.htm#workflow" target="_blank">'._pi_lang_screenshots.'</a>).';
					?>
					
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_hide_for_super_admin; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="item_props_hideforsuperadmin" value="true" <?php if($class_pi->pi_config['item_props_hideforsuperadmin']){echo 'checked="checked"';} ?> />
				</td>
			</tr>						
			</table>
			</div>
			<div id="new_item">
			<table  class="adminlist" width="100%">
			<tr>
				<th colspan="2">					
					<?php echo _pi_lang_new_item.' '._pi_lang_default; ?> 
				</th>
			</tr>
			<tr>		
				<td width="200">
					<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_frontpage_tip; ?>', CAPTION, '<?php echo _pi_lang_frontpage; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_frontpage; ?></span>				
				</td>
				<td>
					<input type="checkbox" name="item_new_frontpage" value="true" <?php if($class_pi->pi_config['item_new_frontpage']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>
					<span class="lowercase"><?php echo _pi_lang_show_title; ?></span>				
				</td>
				<td>
					<input type="checkbox" name="item_new_show_title" value="true" <?php if($class_pi->pi_config['item_new_show_title']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_published; ?>					
				</td>
				<td>
					<input type="checkbox" name="item_new_state" value="true" <?php if($class_pi->pi_config['item_new_state']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>
					<span class="lowercase"><?php echo _pi_lang_access; ?></span>					
				</td>
				<td>
					<select name="item_new_access" class="inputbox">
						<option value="0" <?php if($class_pi->pi_config['item_new_access']==0){echo "selected=\"selected\"";} ?>><?php echo _pi_lang_public; ?></option>
						<option value="1" <?php if($class_pi->pi_config['item_new_access']==1){echo "selected=\"selected\"";} ?>><?php echo _pi_lang_logged; ?></option>
						<option value="2" <?php if($class_pi->pi_config['item_new_access']==2){echo "selected=\"selected\"";} ?>><?php echo _pi_lang_special; ?></option>
					</select>
				</td>
			</tr>
			<tr>		
				<td>
					<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_defaultlanguage_tip; ?>', CAPTION, '<?php echo _pi_lang_defaultlanguage; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_defaultlanguage; ?></span>								
				</td>
				<td>
					<input type="text" name="item_language" value="<?php echo $class_pi->pi_config['item_language']; ?>" />
				</td>
			</tr>
			<tr>
			<td>
			<?php echo _pi_lang_defaultaltreadmore; ?>
			</td>
			<td>
			<input type="text" name="item_readmore" value="<?php echo $class_pi->pi_config['item_readmore']; ?>" />
			</td>
			</tr>	
			<tr>		
				<td>
					<?php echo _pi_lang_new_item_link_frontend; ?>								
				</td>
				<td>
					<div>
						<?php echo _pi_lang_new_item_link_frontend2; ?>
					</div>
					index.php?option=com_pi_pages_and_items&amp;task=item&amp;sub_task=new&amp;Itemid=888
					<div><br />
						<?php echo _pi_lang_new_item_link_frontend3; ?>
					</div>
					index.php?option=com_pi_pages_and_items&amp;task=item_type_select&amp;Itemid=888					
					<div>
						<input type="checkbox" name="item_type_select_frontend" value="true" <?php if($class_pi->pi_config['item_type_select_frontend']){echo 'checked="checked"';} ?> /> <?php echo _pi_lang_enabled_itemtype_select_frontend; ?>
						<br />
						<input type="checkbox" name="item_type_not_text_frontend" value="true" <?php if($class_pi->pi_config['item_type_not_text_frontend']){echo 'checked="checked"';} ?> /> <?php echo _pi_lang_enabled_itemtype_not_text_frontend; ?>
						<br />
						<input type="checkbox" name="item_type_not_text_frontend_edit" value="true" <?php if($class_pi->pi_config['item_type_not_text_frontend_edit']){echo 'checked="checked"';} ?> /> <?php echo _pi_lang_enabled_itemtype_not_text_frontend_edit; ?>
					</div>
					<div>
					<br />
						<?php echo _pi_lang_new_item_link_frontend4; ?>
					</div>
					index.php?option=com_pi_pages_and_items&amp;task=item&amp;sub_task=new&amp;pageId=888&amp;item_type=html
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_frontend_category_selector_type; ?>							
				</td>
				<td>
					<?php echo _pi_lang_frontend_category_selector_type2; ?>.<br />	
					<label><input name="new_item_section_category_select" type="radio" value="pages" class="radio" <?php if($class_pi->pi_config['new_item_section_category_select']!='section_categories'){echo ' checked="checked"';} ?> /><?php echo _pi_lang_select_with_pages; ?></label><br />
					<label><input name="new_item_section_category_select" type="radio" value="section_categories" class="radio" <?php if($class_pi->pi_config['new_item_section_category_select']=='section_categories'){echo ' checked="checked"';} ?> /><?php echo _pi_lang_select_with_sections_and_categories; ?></label>
				</td>
			</tr>					
			</table>
			</div>
			<div id="images" >
			<table class="adminlist" width="100%">			
			<tr>
				<th colspan="2">	
				<?php echo _pi_lang_images; ?>							
				</th>
			</tr>
			<tr>
				<td colspan="2">	
				<?php echo _pi_lang_images_info; ?>							
				</td>
			</tr>
			<tr>		
				<td colspan="2">
					<img src='components/com_pi_pages_and_items/images/images_popup.png' style="border: 1px solid #000" alt="screenshot image-popup" />			
				</td>
			</tr>
			<tr>		
				<td>
					<?php
					if( defined('_JEXEC') ){
						//joomla 1.5
						$plugins_dir = 'plugins';						
					}else{
						//joomla 1.0.x
						$plugins_dir = 'mambots';						
					}
					?>
					<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_fileswriteableimage_tip; ?><ul><li><?php echo $plugins_dir; ?> &gt; editors &gt; tinymce &gt; jscript &gt; tuni_mce &gt; plugins &gt; advimage &gt; image.htm</li><li><?php echo $plugins_dir; ?> &gt; editors &gt; tinymce &gt; jscript &gt; tuni_mce &gt; plugins &gt; advimage &gt; editor_plugin.js</li></ul>', CAPTION, '<?php echo _pi_lang_fileswriteableimage; ?>', BELOW, RIGHT, WIDTH, 600);" onMouseOut="return nd();" ><?php echo _pi_lang_fileswriteableimage; ?></span>					
				</td>
				<td>
					<?php
															
					if (is_writable(dirname(__FILE__).'/../../../../'.$plugins_dir.'/editors/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm') && is_writable(dirname(__FILE__).'/../../../../'.$plugins_dir.'/editors/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js')){
						echo '<span style="color: #5F9E30;">'._pi_lang_fileswriteable.'</span>';
						$image_writeable = true;
					} else {
						echo '<span style="color: red;">'._pi_lang_filesnotwriteable.'</span>';
						$image_writeable = false;
					}	
					?>					
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_statusimagepopup; ?>	
				</td>
				<td>
					<?php
					if( defined('_JEXEC') ){
						//joomla 1.5
						$plugins_dir = 'plugins';
						$script = '1_5';					
					}else{
						//joomla 1.0.x
						$plugins_dir = 'mambots';
						$script = '1_0';						
					}
										
					if (filesize(dirname(__FILE__).'/../../../../'.$plugins_dir.'/editors/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm')>13000){
						echo '<span style="color: #5F9E30;">'._pi_lang_imagepopupinstalled.'</span>';						
					} else {
						echo '<span style="color: red;">'._pi_lang_imagepopupnotinstalled.'</span>';						
					}	
					?>					
				</td>
			</tr>
			<tr>		
				<td>
					<span class="editlinktip"><span onMouseOver="return overlib('<?php echo _pi_lang_activate.' = '._pi_lang_activate2.'<br /><br />'._pi_lang_undoactivation.' = '._pi_lang_undoactivation2.'<br /><br />'._pi_lang_donothing.' = '._pi_lang_donothing; ?>', CAPTION, '<?php echo _pi_lang_imagepopup; ?>', BELOW, RIGHT, WIDTH, 550);" onMouseOut="return nd();" ><?php echo _pi_lang_imagepopup; ?></span></span>					
				</td>
				<td>					
					<label><input name="image_popup_action" type="radio" value="do_hack" class="radio" <?php if(!$image_writeable){echo ' disabled="disabled"';} ?> /><?php echo _pi_lang_activate; ?></label><br />
					<label><input name="image_popup_action" type="radio" value="do_unhack" class="radio" <?php if(!$image_writeable){echo ' disabled="disabled"';} ?> /><?php echo _pi_lang_undoactivation; ?></label><br />
					<label><input name="image_popup_action" type="radio" value="do_nothing" class="radio" checked="checked" <?php if(!$image_writeable){echo ' disabled="disabled"';} ?> /><?php echo _pi_lang_donothing; ?></label>
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_imagemaxsize; ?>					
				</td>
				<td>
					<input type="text" name="image_maxsize" value="<?php echo $class_pi->pi_config['image_maxsize']; ?>" />&nbsp;bytes			
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_imagefiletypes; ?>					
				</td>
				<td>
					<?php
						$allowed_extensions = explode(",", $class_pi->pi_config['image_filetypes']);

						$all_extensions = array('gif','jpg','jpeg','png');
						foreach ($all_extensions as $extension){
							$checked = '';
							if(in_array($extension, $allowed_extensions)){
								$checked = 'checked="checked"';
							}
							echo '<input type="checkbox" class="checkbox" name="image_filetypes[]" value="'.$extension.'" '.$checked.' />'.$extension.'<br />';
						}
					?>
				</td>
			</tr>
			<tr>		
				<td>
					<span class="editlinktip"><span onMouseOver="return overlib('<?php echo _pi_lang_imageresize; ?>', CAPTION, '<?php echo _pi_lang_imagemaxwidth; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_imagemaxwidth; ?></span></span>					
				</td>
				<td>
					<input type="text" name="image_max_width" value="<?php echo $class_pi->pi_config['image_max_width']; ?>" size="3" />&nbsp;px			
				</td>
			</tr>
			<tr>		
				<td>
					<span class="editlinktip"><span onMouseOver="return overlib('<?php echo _pi_lang_imageresize; ?>', CAPTION, '<?php echo _pi_lang_imagemaxheight; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_imagemaxheight; ?>	</span></span>				
				</td>
				<td>
					<input type="text" name="image_max_height" value="<?php echo $class_pi->pi_config['image_max_height']; ?>" size="3" />&nbsp;px			
				</td>
			</tr>
			<tr>		
				<td>
					/images/stories			
				</td>
				<td>
					<?php 
					if (is_writable(dirname(__FILE__).'/../../../../images/stories/')){
						echo '<span style="color: #5F9E30;">'._pi_lang_configwriteable.'</span>';						
					} else {
						echo '<span style="color: red;">'._pi_lang_confignotwriteable.'</span>';						
					} ?>		
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<?php
					echo _pi_lang_deinstall.'<br /><br />'._pi_lang_imagepopupnotkeen.'<ul><li>administrator/components/com_pi_pages_and_items/tinymce_popup/image_modified.htm<br />'._pi_lang_replaces.'<br />'.$plugins_dir.'/editors/tinymce/jscript/tiny_mce/plugins/advimage/image.htm</li><li>administrator/components/com_pi_pages_and_items/tinymce_popup/popsize_image_'.$script.'.js<br />'._pi_lang_replaces.'<br />'.$plugins_dir.'/editors/tinymce/jscript/tiny_mce/plugins/advimage/editor_plugin.js</li></ul><br />'._pi_lang_alter_popup_size.'<br /><ul><li>'.$plugins_dir.'/editors/tinymce/jscript/tiny_mce/plugins/advimage/editor_plugin.js</li><li>'.$plugins_dir.'/editors/tinymce/jscript/tiny_mce/plugins/advimage/editor_plugin_src.js</li></ul>';
					?>
				</td>
			</tr>			
			</table>
			</div>
			<div id="menus">
			<table class="adminlist" width="100%">					
			<tr>		
				<th colspan="2">
					<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_menus_tip; ?>', CAPTION, '<?php echo _pi_lang_menus2; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_menus; ?></span> 
				</th>				
			</tr>
			<tr>		
				<td>&nbsp;
								
				</td>
				<td>
					<span class="sidestep2 b"><?php echo _pi_lang_name; ?></span><span class="b"><?php echo _pi_lang_order; ?></span>
				</td>
			</tr>
			<?php			
			
			//loop through menutypes from config
			$counter = 1;
			$menus_from_config = $class_pi->pi_config['menus'];
			$temp_menus = explode(',',$class_pi->pi_config['menus']);
			if($temp_menus[0]==''){
				$temp_menus = array();
			}
			$menus_on_page = array();
			for($m = 0; $m < count($temp_menus); $m++){					
				$menu_temp = explode(';',$temp_menus[$m]);
				echo '<tr>';
				echo '<td>&nbsp;</td>';
				echo '<td>';
				echo '<span class="sidestep2">';
				echo '<label>';					
				echo '<input type="checkbox" class="checkbox" name="menus[m'.$m.'][menutype]" value="'.$menu_temp[0].'"';
				echo ' checked="checked"';							
				echo ' />';				
				echo $menu_temp[1];
				
				echo '</label>';
				echo '</span>';
				echo '<input type="hidden" name="menus[m'.$m.'][title]" value="'.$menu_temp[1].'" />';
				echo '<input type="text" name="menus[m'.$m.'][order]" size="2" value="'.$counter.'"';				
				echo ' />';				
				echo '</td>';
				echo '</tr>';
				array_push($menus_on_page, $menu_temp[0]);
				$counter = $counter + 1;	
			}
			
			//get all menutypes
			$menutypes_db = array();
			if( defined('_JEXEC') ){
				//joomla 1.5				
				$class_pi->db->setQuery("SELECT title, menutype FROM #__menu_types ORDER BY title ASC"  );
				$rows = $class_pi->db-> loadObjectList();
				
				foreach($rows as $row){					
					$new_menutype = array(strtolower($row->menutype),$row->title);
					array_push($menutypes_db, $new_menutype);					
				}					
			}else{
				//joomla 1.0.x
				$class_pi->db->setQuery("SELECT id, title, module, params FROM #__modules WHERE module='mod_mainmenu' ORDER BY title ASC"  );
				$rows = $class_pi->db-> loadObjectList();				
				
				foreach($rows as $row){					
					$params = explode( "\n", $row->params);
					for($n = 0; $n < count($params); $n++){
						list($var,$value) = split('=',$params[$n]); 
						$values[$var] = trim($value);	 
					}
					$new_menutype = array(strtolower($values['menutype']),$row->title);
					array_push($menutypes_db, $new_menutype);					
				}				
			}
			
			//loop through menutypes from database
			for($m = 0; $m < count($menutypes_db); $m++){
				if(!in_array($menutypes_db[$m][0], $menus_on_page)){	
					echo '<tr>';
					echo '<td>&nbsp;</td>';
					echo '<td>';
					echo '<span class="sidestep2">';
					echo '<label>';					
					echo '<input type="checkbox" class="checkbox" name="menus[m'.($counter-1).'][menutype]" value="'.$menutypes_db[$m][0].'"';					
					echo ' />';
					echo $menutypes_db[$m][1];
					echo '</label>';
					echo '</span>';
					echo '<input type="hidden" name="menus[m'.($counter-1).'][title]" value="'.$menutypes_db[$m][1].'" />';
					echo '<input type="text" name="menus[m'.($counter-1).'][order]" size="2" value="'.$counter.'"';					
					echo ' />';						
					echo '</td>';
					echo '</tr>';						
					$counter = $counter + 1;
				}
			}
				
			?>	
			</table>
			</div>
			<div id="links_and_downloads">
			<table  class="adminlist" width="100%">				
			<tr>
				<th colspan="2">
					<?php echo _pi_lang_linksdownloadpopup; ?>												
				</th>
			</tr>
			<tr>
				<td colspan="2">
					<?php echo _pi_lang_linksdownloadpopup_info; ?>
				</td>
			</tr>
			<tr>
				<td colspan="2">					
					<img src='components/com_pi_pages_and_items/images/links_downloads_popup.png' alt="screenshot links-downlaods-popup" style="border: 1px solid #000" />	
				</td>
			</tr>
			<tr>		
				<td>
					<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_fileswriteablelink_tip; ?>', CAPTION, '<?php echo _pi_lang_fileswriteablelink; ?>', BELOW, RIGHT, WIDTH, 600);" onMouseOut="return nd();" ><?php echo _pi_lang_fileswriteablelink; ?></span>
				</td>
				<td>
					<?php															
					if (is_writable(dirname(__FILE__).'/../../../../'.$plugins_dir.'/editors/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm') && is_writable(dirname(__FILE__).'/../../../../'.$plugins_dir.'/editors/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js')){
						echo '<span style="color: #5F9E30;">'._pi_lang_fileswriteable.'</span>';
						$link_writeable = true;
					} else {
						echo '<span style="color: red;">'._pi_lang_filesnotwriteable.'</span>';
						$link_writeable = false;
					}	
					?>					
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_linkspopupstatus; ?>				
				</td>
				<td>
					<?php
															
					if (filesize(dirname(__FILE__).'/../../../../'.$plugins_dir.'/editors/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm')>20000){
						echo '<span style="color: #5F9E30;">'._pi_lang_linkpopupinstalled.'</span>';						
					} else {
						echo '<span style="color: red;">'._pi_lang_linkpopupnotinstalled.'</span>';						
					}	
					?>
				</td>
			</tr>
			<tr>		
				<td>
					<span  class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_activate.' = '._pi_lang_activate3.'<br /><br />'._pi_lang_undoactivation.' = '._pi_lang_undoactivation2.'<br /><br />'._pi_lang_donothing.' = '._pi_lang_donothing; ?>', CAPTION, '<?php echo _pi_lang_linkspopup; ?>', BELOW, RIGHT, WIDTH, 550);" onMouseOut="return nd();" ><?php echo _pi_lang_linkspopup; ?></span>			
				</td>
				<td>					
					<label><input name="link_popup_action" type="radio" value="do_hack" class="radio" <?php if(!$link_writeable){echo ' disabled="disabled"';} ?> /><?php echo _pi_lang_activate; ?></label><br />
					<label><input name="link_popup_action" type="radio" value="do_unhack" class="radio" <?php if(!$link_writeable){echo ' disabled="disabled"';} ?> /><?php echo _pi_lang_undoactivation; ?></label><br />
					<label><input name="link_popup_action" type="radio" value="do_nothing" class="radio" checked="checked" <?php if(!$link_writeable){echo ' disabled="disabled"';} ?> /><?php echo _pi_lang_donothing; ?></label>
				</td>
			</tr>
			<tr>		
				<td>
					<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_downloadallowed_tip; ?>', CAPTION, '<?php echo _pi_lang_downloadallowed; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_downloadallowed; ?></span>				
				</td>
				<td>
					<input type="checkbox" name="download_allow" value="true" <?php if($class_pi->pi_config['download_allow']){echo ' checked="checked"';} ?> />
				</td>
			</tr>			
			<tr>		
				<td>
					<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_downloadfiletypes_tip; ?>', CAPTION, '<?php echo _pi_lang_downloadfiletypes; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_downloadfiletypes; ?>	</span>			
				</td>
				<td>
					<input type="text" name="download_filetypes" value="<?php echo $class_pi->pi_config['download_filetypes']; ?>" style="width: 400px;"  />		
				</td>
			</tr>
			<tr>		
				<td>				
					<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_downloadmaxsize_tip; ?>', CAPTION, '<?php echo _pi_lang_downloadmaxsize; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_downloadmaxsize; ?></span>			
								
				</td>
				<td>
					<input type="text" name="download_maxsize" value="<?php echo $class_pi->pi_config['download_maxsize']; ?>" />&nbsp;bytes			
				</td>
			</tr>			
			<tr>		
				<td>
					<?php echo _pi_lang_downloadhits; ?><span class="big_red_letter">A</span>			
				</td>
				<td>
					<input type="checkbox" name="download_hits" value="true" <?php if($class_pi->pi_config['download_hits']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_downloadhitsreset; ?><span class="big_red_letter">B</span>				
				</td>
				<td>
					<input type="checkbox" name="download_hitsreset" value="true" <?php if($class_pi->pi_config['download_hitsreset']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>
					<span class="editlinktip"><span onMouseOver="return overlib('<?php echo _pi_lang_downloaddebugger_tip; ?>', CAPTION, '<?php echo _pi_lang_downloaddebugger; ?>', BELOW, RIGHT, WIDTH, 400);" onMouseOut="return nd();" ><?php echo _pi_lang_downloaddebugger; ?></span></span>					
				</td>
				<td>
					<input type="checkbox" name="download_debugger" value="true" <?php if($class_pi->pi_config['download_debugger']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>
					/media			
				</td>
				<td>
					<?php 
					if (is_writable(dirname(__FILE__).'/../../../../media/')){
						echo '<span style="color: #5F9E30;">'._pi_lang_configwriteable.'</span>';						
					} else {
						echo '<span style="color: red;">'._pi_lang_confignotwriteable.'</span>';						
					} ?>		
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<?php
						echo _pi_lang_imagepopupnotkeen.'<ul><li>administrator/components/com_pi_pages_and_items/tinymce_popup/link_modified.htm<br />'._pi_lang_replaces.'<br />'.$plugins_dir.'/editors/tinymce/jscript/tiny_mce/plugins/advlink/link.htm</li><li>administrator/components/com_pi_pages_and_items/tinymce_popup/popsize_link_'.$script.'.js<br />'._pi_lang_replaces.'<br />'.$plugins_dir.'/editors/tinymce/jscript/tiny_mce/plugins/advlink/editor_plugin.js</li></ul><br />'._pi_lang_alter_popup_size.'<br /><ul><li>'.$plugins_dir.'/editors/tinymce/jscript/tiny_mce/plugins/advlink/editor_plugin.js</li><li>'.$plugins_dir.'/editors/tinymce/jscript/tiny_mce/plugins/advlink/editor_plugin_src.js</li></ul>';
					?>
				</td>
			</tr>
			</table>
			</div>
			<div id="sections">
			<table class="adminlist" width="100%">			
			<tr>
				<th colspan="2">	
					<?php echo _pi_lang_sections; ?>
				</th>
			</tr>			
			<tr>		
				<td>
					<?php echo _pi_lang_sections_on_page; ?>			
				</td>
				<td>
					<span class="sidestep2 b"><?php echo _pi_lang_name; ?></span><span class="b"><?php echo _pi_lang_order; ?></span>
				</td>
			</tr>
			<?php			
			
			//loop through menutypes from config
			$counter = 1;			
			$sections_on_page = array();
			$section_array = explode(',',$class_pi->pi_config['sections']);
			if($section_array[0]==''){
				$section_array = array();
			}
			for($m = 0; $m < count($section_array); $m++){				
				$temp_section = explode(';',$section_array[$m]);
				echo '<tr>';
				echo '<td>&nbsp;</td>';
				echo '<td>';
				echo '<span class="sidestep2">';
				echo '<label>';					
				echo '<input type="checkbox" class="checkbox" name="sections[s'.$m.'][sectionid]" value="'.$temp_section[0].'"';
				echo ' checked="checked"';							
				echo ' />';							
				echo $temp_section[1];
				echo '</label>';
				echo '</span>';
				echo '<input type="hidden" name="sections[s'.$m.'][sectionname]" value="'.$temp_section[1].'" />';
				echo '<input type="text" name="sections[s'.$m.'][order]" size="2" value="'.$counter.'"';				
				echo ' />';				
				echo '</td>';
				echo '</tr>';
				array_push($sections_on_page, $temp_section[0]);
				$counter = $counter + 1;	
			}
			
			//get all menutypes from database
			$sections_db = array();							
			$class_pi->db->setQuery("SELECT id, title "
			."FROM #__sections "		
			."ORDER BY ordering ASC"
			);
			$rows = $class_pi->db->loadObjectList();
			
			foreach($rows as $row){					
				$new_section = array($row->id, strtolower($row->title));
				array_push($sections_db, $new_section);					
			}					
			
			
			//loop through sections from database
			for($m = 0; $m < count($sections_db); $m++){
				if(!in_array($sections_db[$m][0], $sections_on_page)){	
					echo '<tr>';
					echo '<td>&nbsp;</td>';
					echo '<td>';
					echo '<span class="sidestep2">';
					echo '<label>';					
					echo '<input type="checkbox" class="checkbox" name="sections[s'.($counter-1).'][sectionid]" value="'.$sections_db[$m][0].'"';					
					echo ' />';
					echo $sections_db[$m][1];
					echo '</label>';
					echo '</span>';
					echo '<input type="hidden" name="sections[s'.($counter-1).'][sectionname]" value="'.$sections_db[$m][1].'" />';
					echo '<input type="text" name="sections[s'.($counter-1).'][order]" size="2" value="'.$counter.'"';					
					echo ' />';						
					echo '</td>';
					echo '</tr>';						
					$counter = $counter + 1;
				}
			}
				
			?>
			<tr>		
				<td width="30%">&nbsp;
								
				</td>
				<td>
					<input type="checkbox" value="true" name="sections_from_db" <?php if($class_pi->pi_config['sections_from_db']){echo 'checked="checked"';} ?> /><?php echo _pi_lang_sections_from_db; ?>	 			
				</td>
			</tr>
			<tr>		
				<td width="30%">
					<?php echo _pi_lang_inherit_from_parent; ?>				
				</td>
				<td>
					<input type="checkbox" value="true" name="inherit_from_parent" <?php if($class_pi->pi_config['inherit_from_parent']){echo 'checked="checked"';} ?> /> 			
				</td>
			</tr>
			
			<tr>		
				<td width="30%">
					<?php echo _pi_lang_inherit_from_parent_move; ?>				
				</td>
				<td>
					<input type="checkbox" value="true" name="inherit_from_parent_move" <?php if($class_pi->pi_config['inherit_from_parent_move']){echo 'checked="checked"';} ?> /> 			
				</td>
			</tr>
			<tr>		
				<td width="30%">
					<?php echo _pi_lang_child_inherit_from_parent; ?>				
				</td>
				<td>
					<input type="checkbox" value="true" name="child_inherit_from_parent_move" <?php if($class_pi->pi_config['child_inherit_from_parent_move']){echo 'checked="checked"';} ?> /> 			
				</td>
			</tr>
			<tr>		
				<td width="30%">
					<?php echo _pi_lang_child_inherit_from_parent_change; ?>				
				</td>
				<td>
					<input type="checkbox" value="true" name="child_inherit_from_parent_change" <?php if($class_pi->pi_config['child_inherit_from_parent_change']){echo 'checked="checked"';} ?> /> 			
				</td>
			</tr>						
			<tr>
				<td colspan="2">
					<?php echo _pi_lang_items_always_inherit; ?>					
				</td>
			</tr>
			</table>
			</div>
			<div id="pages">
			<table class="adminlist" width="100%">
			<tr>
				<th colspan="3">
					<?php echo _pi_lang_pages; ?>		
				</th>				
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_make_page_alias_unique; ?>				
				</td>
				<td colspan="2">
					<?php
					$make_page_alias_unique = '0';
					if($class_pi->pi_config['make_page_alias_unique']){
						$make_page_alias_unique = $class_pi->pi_config['make_page_alias_unique'];
					}
					?>
					<input type="checkbox" name="make_page_alias_unique" value="true" <?php if($make_page_alias_unique){echo 'checked="checked"';} ?> /> <?php echo _pi_lang_make_page_alias_unique_info.'.'; ?>	
				</td>				
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_make_menu_alias_unique_tool; ?>				
				</td>
				<td colspan="2">
					<input type="button" value="<?php echo _pi_lang_make_menu_alias_button.'.'; ?>" onclick="if(confirm('<?php echo addslashes(_pi_lang_are_you_sure_menu_aliasses_unique); ?>')){document.location.href = 'index3.php?option=com_pi_pages_and_items&task=render_menu_alias_unique';}" /> <?php echo _pi_lang_make_menu_alias_unique_tool_info.'.'; ?>	
				</td>				
			</tr>
			<tr>		
				<td>
					<?php echo _pi_lang_truncate_item_titles; ?>				
				</td>
				<td colspan="2">
					<?php
					$truncate_item_title = '0';
					if($class_pi->pi_config['truncate_item_title']){
						$truncate_item_title = $class_pi->pi_config['truncate_item_title'];
					}
					?>
					<input type="text" value="<?php echo $truncate_item_title; ?>" name="truncate_item_title" />	<?php echo _pi_lang_truncate_item_titles2; ?>.
				</td>							
			</tr>
			<tr>
				<td colspan="3">&nbsp;					
				</td>
			</tr>
			<tr>
				<th>
					<?php echo _pi_lang_page_properties; ?>		
				</th>
				<th>				
				 	<?php echo _pi_lang_display_page_property_when_editting; ?>	
				</th>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_publish; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_publish" value="true" <?php if($class_pi->pi_config['page_props_publish']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_section; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_section" value="true" <?php if($class_pi->pi_config['page_props_section']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_alias; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_alias" value="true" <?php if($class_pi->pi_config['page_props_alias']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_page_title; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_title" value="true" <?php if($class_pi->pi_config['page_props_title']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_title_visible; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_title_visible" value="true" <?php if($class_pi->pi_config['page_props_title_visible']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_show_in_menu; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_show_in_menu" value="true" <?php if($class_pi->pi_config['page_props_show_in_menu']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_access; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_access" value="true" <?php if($class_pi->pi_config['page_props_access']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_defaulthome; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_defaulthome" value="true" <?php if($class_pi->pi_config['page_props_defaulthome']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_leading; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_leading" value="true" <?php if($class_pi->pi_config['page_props_leading']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_nr_intro; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_nr_intro" value="true" <?php if($class_pi->pi_config['page_props_nr_intro']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_columns; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_columns" value="true" <?php if($class_pi->pi_config['page_props_columns']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_nr_links; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_nr_links" value="true" <?php if($class_pi->pi_config['page_props_nr_links']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_cat_order; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_cat_order" value="true" <?php if($class_pi->pi_config['page_props_cat_order']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_primaryorder; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_primaryorder" value="true" <?php if($class_pi->pi_config['page_props_primaryorder']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_pagination; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_pagination" value="true" <?php if($class_pi->pi_config['page_props_pagination']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_paginationresults; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_paginationresults" value="true" <?php if($class_pi->pi_config['page_props_paginationresults']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_feedlink; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_feedlink" value="true" <?php if($class_pi->pi_config['page_props_feedlink']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_shownoauth; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_shownoauth" value="true" <?php if($class_pi->pi_config['page_props_shownoauth']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_categorydescription; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_categorydescription" value="true" <?php if($class_pi->pi_config['page_props_categorydescription']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_categorydescriptionimage; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_categorydescriptionimage" value="true" <?php if($class_pi->pi_config['page_props_categorydescriptionimage']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_categoryname; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_categoryname" value="true" <?php if($class_pi->pi_config['page_props_categoryname']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_categorynameclickable; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_categorynameclickable" value="true" <?php if($class_pi->pi_config['page_props_categorynameclickable']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_itemtitles; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_itemtitles" value="true" <?php if($class_pi->pi_config['page_props_itemtitles']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_showintro; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_showintro" value="true" <?php if($class_pi->pi_config['page_props_showintro']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_section_title; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_section_title" value="true" <?php if($class_pi->pi_config['page_props_section_title']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_sectionlink; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_sectionlink" value="true" <?php if($class_pi->pi_config['page_props_sectionlink']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_linkedtitles; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_linkedtitles" value="true" <?php if($class_pi->pi_config['page_props_linkedtitles']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_readmore; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_readmore" value="true" <?php if($class_pi->pi_config['page_props_readmore']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_itemrating; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_itemrating" value="true" <?php if($class_pi->pi_config['page_props_itemrating']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_authornames; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_authornames" value="true" <?php if($class_pi->pi_config['page_props_authornames']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_createdtimedate; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_createdtimedate" value="true" <?php if($class_pi->pi_config['page_props_createdtimedate']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_modifiedtimedate; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_modifiedtimedate" value="true" <?php if($class_pi->pi_config['page_props_modifiedtimedate']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_showitemnavigation; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_showitemnavigation" value="true" <?php if($class_pi->pi_config['page_props_showitemnavigation']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_show_icons; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_show_icons" value="true" <?php if($class_pi->pi_config['page_props_show_icons']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_pdf_link; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_pdf_link" value="true" <?php if($class_pi->pi_config['page_props_pdf_link']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_print; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_print" value="true" <?php if($class_pi->pi_config['page_props_print']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_mail_link; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_mail_link" value="true" <?php if($class_pi->pi_config['page_props_mail_link']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_showhits; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_showhits" value="true" <?php if($class_pi->pi_config['page_props_showhits']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_feedsummary; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_feedsummary" value="true" <?php if($class_pi->pi_config['page_props_feedsummary']){echo 'checked="checked"';} ?> />
				</td>
			</tr>

			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_suffix; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_suffix" value="true" <?php if($class_pi->pi_config['page_props_suffix']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_secure; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_secure" value="true" <?php if($class_pi->pi_config['page_props_secure']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_category_id; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_catid" value="true" <?php if($class_pi->pi_config['page_props_catid']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_section_id; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_sectionid" value="true" <?php if($class_pi->pi_config['page_props_sectionid']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_menu_id; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_menuid" value="true" <?php if($class_pi->pi_config['page_props_menuid']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			<tr>		
				<td>&nbsp;
									
				</td>
				<td colspan="2">
					<?php echo _pi_lang_config_more_with_aua.' <a href="http://www.pages-and-items.com/admin-user-access/" target="_blank">Admin-User-Access</a> (<a href="http://www.pages-and-items.com/screenshots_admin_user_access.htm#workflow" target="_blank">'._pi_lang_screenshots.'</a>).';
					?>
					
				</td>
			</tr>
			<tr>		
				<td class="lowercase">
					<?php echo _pi_lang_hide_for_super_admin; ?>						
				</td>
				<td colspan="2">
					<input type="checkbox" name="page_props_hideforsuperadmin" value="true" <?php if($class_pi->pi_config['page_props_hideforsuperadmin']){echo 'checked="checked"';} ?> />
				</td>
			</tr>
			</table>
			</div>
			<div id="new_page">
			<table class="adminlist" width="100%">			
			<tr>
				<th colspan="2">					
					<?php 
					
						//start new page attributes
						echo _pi_lang_new_page.' (Joomla ';
						if( defined('_JEXEC') ){
							//joomla 1.5
							echo '1.5';							
						}else{
							//joomla 1.0.x
							echo '1.0.x';							
						}
						echo ') '._pi_lang_default;
						
						$page_new_attribs = $class_pi->pi_config['page_new_attribs'];
						
						//explode array $page_new_attribs
						$params = explode( "\n", $page_new_attribs);					
						
						for($n = 1; $n < count($params); $n++){							
							$temp = explode('=',$params[$n]);
							$var = $temp[0];
							$value = '';
							if(count($temp)==2){
								$value = $temp[1];
							}							
							$values[$var] = trim($value);	 
						}
						
						//rename attributes for joomla 1.5
						if( defined('_JEXEC') ){
							//joomla 1.5
							$leading = 'num_leading_articles';
							$intro = 'num_intro_articles';	
							$columns = 'num_columns';
							$link = 'num_links';	
							$pagination = 'show_pagination';
							$pagination_results = 'show_pagination_results';	
							$description = 'show_description';
							$description_image = 'show_description_image';
							$category = 'show_category';
							$category_link = 'link_category';	
							$readmore = 'show_readmore';
							$rating = 'show_vote';
							$author = 'show_author';
							$createdate = 'show_create_date';
							$modifydate = 'show_modify_date';
							$pdf = 'show_pdf_icon';
							$print = 'show_print_icon';
							$email = 'show_email_icon';
							$header = 'page_title';
							$show_title = 'show_page_title';
							$show_readmore = 'show_readmore';		
							$section = 'show_section';
							$section_link = 'link_section';			
						}else{
							//joomla 1.0.x
							$leading = 'leading';
							$intro = 'intro';
							$columns = 'columns';
							$link = 'link';
							$pagination = 'pagination';	
							$pagination_results = 'pagination_results';	
							$description = 'description';
							$description_image = 'description_image';
							$category = 'category';
							$category_link = 'category_link';	
							$readmore = 'readmore';
							$rating = 'rating';
							$author = 'author';
							$createdate = 'createdate';
							$modifydate = 'modifydate';
							$pdf = 'pdf';
							$print = 'print';
							$email = 'email';
							$header = 'header';
							$show_title = 'page_title';
							$show_readmore = 'readmore';		
							$section = 'section';
							$section_link = 'section_link';			
						}	

					?> 	
				</th>
			</tr>
			
			 <tr>
    <td>
		<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_publish2_tip; ?>', CAPTION, '<?php echo _pi_lang_publish2; ?>', BELOW, RIGHT);" onMouseOut="return nd();"><?php echo _pi_lang_publish2; ?></span></td>
    <td><label><input type="radio" class="radio" name="page_new_publish_category" value="0" <?php if($class_pi->pi_config['page_new_publish_category']==0){echo "checked=\"checked\"";} ?>  /><?php echo _pi_lang_no; ?></label><label> <input type="radio" class="radio" name="page_new_publish_category" value="1"  <?php if($class_pi->pi_config['page_new_publish_category']==1){echo "checked=\"checked\"";} ?>  /><?php echo _pi_lang_yes; ?></label>
	</td>
  </tr> 
			
			 <tr>
<td width="30%" ><span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_title_visible_tip; ?>', CAPTION, '<?php echo _pi_lang_title_visible; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_title_visible; ?></span>
</span></td>
<td>
	<label><input type="radio" class="radio" name="params[<?php echo $show_title; ?>]" value="0" <?php if($values[$show_title]==0){ echo "checked=\"checked\""; }?> /><?php echo _pi_lang_no; ?></label><label> <input type="radio" class="radio" name="params[<?php echo $show_title; ?>]"  value="1" <?php if($values[$show_title]==1){ echo "checked=\"checked\""; }?> /><?php echo _pi_lang_yes; ?></label>
	

</td>
</tr>
			
			
	 <tr>
    <td>	
	<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_show_in_menu_tip; ?>', CAPTION, '<?php echo _pi_lang_show_in_menu; ?>', BELOW, RIGHT);" onMouseOut="return nd();"><?php echo _pi_lang_show_in_menu; ?></span></td>
    <td><label><input type="radio" class="radio" name="page_new_publish_menu" value="false" <?php if($class_pi->pi_config['page_new_publish_menu']=='false'){echo "checked=\"checked\"";} ?>  /><?php echo _pi_lang_no; ?> </label><label><input type="radio" class="radio" name="page_new_publish_menu" value="true" <?php if($class_pi->pi_config['page_new_publish_menu']=='true'){echo "checked=\"checked\"";} ?> /><?php echo _pi_lang_yes; ?></label>&nbsp;&nbsp;
	<select name="page_new_access_menu" class="inputbox">
		<option value="0" <?php if($class_pi->pi_config['page_new_access_menu']=='0'){echo "selected=\"selected\"";} ?>><?php echo _pi_lang_public; ?></option>
		<option value="1" <?php if($class_pi->pi_config['page_new_access_menu']=='1'){echo "selected=\"selected\"";} ?>><?php echo _pi_lang_logged; ?></option>
		<option value="2" <?php if($class_pi->pi_config['page_new_access_menu']=='2'){echo "selected=\"selected\"";} ?>><?php echo _pi_lang_special; ?></option>	
	</select>	
	</td>
  </tr>
  
  <tr>
    <td>
	<span class="editlinktip" onMouseOver="return overlib('<?php echo _pi_lang_access_tip; ?>', CAPTION, '<?php echo _pi_lang_access; ?>', BELOW, RIGHT);" onMouseOut="return nd();"><?php echo _pi_lang_access; ?></span>
	</td>
    <td><select name="page_new_access_category" class="inputbox">
	<option value="0" <?php if($class_pi->pi_config['page_new_access_category']==0){echo "selected=\"selected\"";} ?>><?php echo _pi_lang_public; ?></option>
	<option value="1" <?php if($class_pi->pi_config['page_new_access_category']==1){echo "selected=\"selected\"";} ?>><?php echo _pi_lang_logged; ?></option>
	<option value="2" <?php if($class_pi->pi_config['page_new_access_category']==2){echo "selected=\"selected\"";} ?>><?php echo _pi_lang_special; ?></option>	
</select></td>
  </tr>  		
			
			
			
			
			<?php if( !defined('_JEXEC') ){ 
		//back-button only in joomla 1.0.x
?>

<tr>
<td width="30%" ><span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_back_tip; ?>', CAPTION, '<?php echo _pi_lang_back; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_back; ?></span>
</span></td>
<td>
<select name="params[back_button]" class="inputbox">
	<option value="" <?php if($values['back_button']==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values['back_button']=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
	<option value="1" <?php if($values['back_button']=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>

<?php } //end if backbutton only for joomla 1.0.x 

?>

<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_leading_tip; ?>', CAPTION, '<?php echo _pi_lang_leading; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_leading; ?></span></span></td>
<td><input type="text" name="params[<?php echo $leading; ?>]" value="<?php print_r($values[$leading]); ?>" class="text_area" size="3" /></td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_nr_intro_tip; ?>', CAPTION, '<?php echo _pi_lang_nr_intro; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_nr_intro; ?></span></span>
</td>
<td><input type="text" name="params[<?php echo $intro; ?>]" value="<?php print_r($values[$intro]); ?>" class="text_area" size="3" /></td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_columns_tip; ?>', CAPTION, '<?php echo _pi_lang_columns; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_columns; ?></span></span>
</td>

<td><input type="text" name="params[<?php echo $columns; ?>]" value="<?php print_r($values[$columns]); ?>" class="text_area" size="3" /></td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip"> 
<span onMouseOver="return overlib('<?php echo _pi_lang_nr_links_tip; ?>', CAPTION, '<?php echo _pi_lang_nr_links; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_nr_links; ?></span></span>
</td>
<td><input type="text" name="params[<?php echo $link; ?>]" value="<?php print_r($values[$link]); ?>" class="text_area" size="3" /></td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">  
<span onMouseOver="return overlib('<?php echo _pi_lang_cat_order_tip; ?>', CAPTION, '<?php echo _pi_lang_cat_order; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_cat_order; ?></span></span>
</td>
<td>
	<select name="params[orderby_pri]" class="inputbox">
		<option value="" <?php if($values['orderby_pri']==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_primaryorderonly; ?></option>
		<option value="alpha" <?php if($values['orderby_pri']=='alpha'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_alphabetic_up; ?></option>
		<option value="ralpha" <?php if($values['orderby_pri']=='ralpha'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_alphabetic_down; ?></option>
		<option value="order" <?php if($values['orderby_pri']=='order'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_ordering; ?></option>
	</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">  
<span onMouseOver="return overlib('<?php echo _pi_lang_primaryorder_tip; ?>', CAPTION, '<?php echo _pi_lang_primaryorder; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_primaryorder; ?></span></span>
</td>
<td>
	<select name="params[orderby_sec]" class="inputbox">
		<option value="" <?php if($values['orderby_sec']==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default_cap; ?></option>
		<option value="date" <?php if($values['orderby_sec']=='date'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_oldest; ?></option>
		<option value="rdate" <?php if($values['orderby_sec']=='rdate'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_mostrecent; ?></option>
		<option value="alpha" <?php if($values['orderby_sec']=='alpha'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_alphabetic_up; ?></option>
		<option value="ralpha" <?php if($values['orderby_sec']=='ralpha'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_alphabetic_down; ?></option>
		<option value="author" <?php if($values['orderby_sec']=='author'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_alphbetic_author_up; ?></option>
		<option value="rauthor" <?php if($values['orderby_sec']=='rauthor'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_alphbetic_author_down; ?></option>
		<option value="hits" <?php if($values['orderby_sec']=='hits'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_mosthits; ?></option>
		<option value="rhits" <?php if($values['orderby_sec']=='rhits'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_leasthits; ?></option>
		<option value="order" <?php if($values['orderby_sec']=='order'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_ordering; ?></option>
	</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip"> 
<span onMouseOver="return overlib('<?php echo _pi_lang_pagination_tip; ?>', CAPTION, '<?php echo _pi_lang_pagination; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_pagination; ?></span></span>
</td>
<td>
	<select name="params[<?php echo $pagination; ?>]" class="inputbox">
		<option value="2" <?php if($values[$pagination]==2){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
		<option value="0" <?php if($values[$pagination]==0){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
		<option value="1" <?php if($values[$pagination]==1){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
		
	</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">  
<span onMouseOver="return overlib('<?php echo _pi_lang_paginationresults_tip; ?>', CAPTION, '<?php echo _pi_lang_paginationresults; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_paginationresults; ?></span></span>

</td>
<td>
	<input type="radio" class="radio" name="params[<?php echo $pagination_results; ?>]" id="params[pagination_results]0" value="0" <?php if($values[$pagination_results]==0){ echo "checked=\"checked\""; }?> />
	<label for="params[pagination_results]0"><?php echo _pi_lang_no; ?></label>
	<input type="radio" class="radio" name="params[<?php echo $pagination_results; ?>]" id="params[pagination_results]1" value="1" <?php if($values[$pagination_results]==1){ echo "checked=\"checked\""; }?>  />
	<label for="params[pagination_results]1"><?php echo _pi_lang_yes; ?></label>
</td>
</tr>
<?php 
//options only for joomla 1.5
if( defined('_JEXEC') ){
	//joomla 1.5
?>
<tr>
<td width="30%" >
<span class="editlinktip">  
<span onMouseOver="return overlib('<?php echo _pi_lang_feedlink_tip; ?>', CAPTION, '<?php echo _pi_lang_feedlink; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_feedlink; ?></span></span>
</td>
<td>
	<input type="radio" class="radio" name="params[show_feed_link]" id="params[pagination_results]0" value="0" <?php if($values['show_feed_link']==0){ echo "checked=\"checked\""; }?> />
	<label for="params[pagination_results]0"><?php echo _pi_lang_no; ?></label>
	<input type="radio" class="radio" name="params[show_feed_link]" id="params[pagination_results]1" value="1" <?php if($values['show_feed_link']==1){ echo "checked=\"checked\""; }?>  />
	<label for="params[pagination_results]1"><?php echo _pi_lang_yes; ?></label>
</td>
</tr>

<tr>
<td width="30%" >
<span class="editlinktip"> 
<span onMouseOver="return overlib('<?php echo _pi_lang_shownoauth_tip; ?>', CAPTION, '<?php echo _pi_lang_shownoauth; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_shownoauth; ?></span></span>
</td>
<td>
	<select name="params[show_noauth]" class="inputbox">
		<option value="2" <?php if($values['show_noauth']==2){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
		<option value="0" <?php if($values['show_noauth']==0){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
		<option value="1" <?php if($values['show_noauth']==1){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
		
	</select>
</td>
</tr>

<?php 
}//end if options only for joomla 1.5
?>
<?php 
//mosimage option only for joomla 1.0.x
if( !defined('_JEXEC') ){
	//joomla 1.0.x
?>
<tr>
<td width="30%">
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_mosimages_tip; ?>', CAPTION, '<?php echo _pi_lang_mosimages; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_mosimages; ?></span></span>
</td>
<td>
	<input type="radio" class="radio" name="params[image]" id="params[image]0" value="0" <?php if($values['image']==0){ echo "checked=\"checked\""; }?> />
	<label for="params[image]0"><?php echo _pi_lang_no; ?></label>
	<input type="radio" class="radio" name="params[image]" id="params[image]1" value="1" <?php if($values['image']==1){ echo "checked=\"checked\""; }?> />
	<label for="params[image]1"><?php echo _pi_lang_yes; ?></label>
</td>
</tr>
<?php 
}//end if joomla 1.0.x for mosimages option 
?>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_categorydescription_tip; ?>', CAPTION, '<?php echo _pi_lang_categorydescription; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_categorydescription; ?></span></span>
</td>
<td>
	<input type="radio" class="radio" name="params[<?php echo $description; ?>]" id="params[description]0" value="0" <?php if($values[$description]==0){ echo "checked=\"checked\""; }?>  />
	<label for="params[description]0"><?php echo _pi_lang_no; ?></label>
	<input type="radio" class="radio" name="params[<?php echo $description; ?>]" id="params[description]1" value="1"  <?php if($values[$description]==1){ echo "checked=\"checked\""; }?> />
	<label for="params[description]1"><?php echo _pi_lang_yes; ?></label>

</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_categorydescriptionimage_tip; ?>', CAPTION, '<?php echo _pi_lang_categorydescriptionimage; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_categorydescriptionimage; ?></span></span>
</td>
<td>
	<input type="radio" class="radio" name="params[<?php echo $description_image; ?>]" id="params[description_image]0" value="0" <?php if($values[$description_image]==0){ echo "checked=\"checked\""; }?>  />
	<label for="params[description_image]0"><?php echo _pi_lang_no; ?></label>
	<input type="radio" class="radio" name="params[<?php echo $description_image; ?>]" id="params[description_image]1" value="1" <?php if($values[$description_image]==1){ echo "checked=\"checked\""; }?> />
	<label for="params[description_image]1"><?php echo _pi_lang_yes; ?></label>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_categoryname_tip; ?>', CAPTION, '<?php echo _pi_lang_categoryname; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_categoryname; ?></span></span>

</td>
<td>
	<input type="radio" class="radio" name="params[<?php echo $category; ?>]" id="params[category]0" value="0" <?php if($values[$category]==0){ echo "checked=\"checked\""; }?>  />
	<label for="params[category]0"><?php echo _pi_lang_no; ?></label>
	<input type="radio" class="radio" name="params[<?php echo $category; ?>]" id="params[category]1" value="1"  <?php if($values[$category]==1){ echo "checked=\"checked\""; }?> />
	<label for="params[category]1"><?php echo _pi_lang_yes; ?></label>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_categorynameclickable_tip; ?>', CAPTION, '<?php echo _pi_lang_categorynameclickable; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_categorynameclickable; ?></span></span>
</td>
<td>
	<input type="radio" class="radio" name="params[<?php echo $category_link; ?>]" id="params[category_link]0" value="0" <?php if($values[$category_link]==0){ echo "checked=\"checked\""; }?>  />
	<label for="params[category_link]0"><?php echo _pi_lang_no; ?></label>
	<input type="radio" class="radio" name="params[<?php echo $category_link; ?>]" id="params[category_link]1" value="1" <?php if($values[$category_link]==1){ echo "checked=\"checked\""; }?> />
	<label for="params[category_link]1"><?php echo _pi_lang_yes; ?></label>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_itemtitles_tip; ?>', CAPTION, '<?php echo _pi_lang_itemtitles; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_itemtitles; ?></span></span>
</td>
<td>
<?php
//radio buttons with 2 options for joomla 1.0.x . select with 3 options for joomla 1.5 (don't ask me why)
if( defined('_JEXEC') ){
	//joomla 1.5
	?>
	<select name="params[show_title]" class="inputbox">
		<option value="2" <?php if($values['show_title']==2){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
		<option value="0" <?php if($values['show_title']==0){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
		<option value="1" <?php if($values['show_title']==1){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
		
	</select>
	<?php
}else{
	//joomla 1.0.x
	?>
	<label><input type="radio" class="radio" name="params[item_title]" value="0" <?php if($values['item_title']==0){ echo "checked=\"checked\""; }?> /><?php echo _pi_lang_no; ?></label>
	<label><input type="radio" class="radio" name="params[item_title]" value="1" <?php if($values['item_title']==1){ echo "checked=\"checked\""; }?>  /><?php echo _pi_lang_yes; ?></label>
	<?php
}
?>	
</td>
</tr>

<?php
//show introtext_option, section_name, section_name_linkable only for joomla 1.5
if( defined('_JEXEC') ){
	//joomla 1.5
	?>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_showintro_tip; ?>', CAPTION, '<?php echo _pi_lang_showintro; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_showintro; ?></span></span>
</td>
<td>
	<select name="params[show_intro]" class="inputbox">
		<option value="" <?php if($values['show_intro']==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
		<option value="0" <?php if($values['show_intro']=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>	
		<option value="1" <?php if($values['show_intro']=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
	</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_section_tip; ?>', CAPTION, '<?php echo _pi_lang_section; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_section; ?></span></span>
</td>
<td>
	<select name="params[<?php echo $section; ?>]" class="inputbox">
		<option value="" <?php if($values[$section]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
		<option value="0" <?php if($values[$section]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
	
		<option value="1" <?php if($values[$section]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
	</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_sectionlink_tip; ?>', CAPTION, '<?php echo _pi_lang_sectionlink; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_sectionlink; ?></span></span>
</td>
<td>
	<select name="params[<?php echo $section_link; ?>]" class="inputbox">
		<option value="" <?php if($values[$section_link]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
		<option value="0" <?php if($values[$section_link]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
	
		<option value="1" <?php if($values[$section_link]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
	</select>
</td>
</tr>
<?php
}//end if show introtext option, section, section_name_linkable only for joomla 1.5
?>

<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_linkedtitles_tip; ?>', CAPTION, '<?php echo _pi_lang_linkedtitles; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_linkedtitles; ?></span></span>
</td>
<td>
	<select name="params[link_titles]" class="inputbox">
		<option value="" <?php if($values['link_titles']==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
		<option value="0" <?php if($values['link_titles']=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
	
		<option value="1" <?php if($values['link_titles']=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
	</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_readmore_tip; ?>', CAPTION, '<?php echo _pi_lang_readmore; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_readmore; ?></span></span>
</td>
<td>
	<select name="params[<?php echo $readmore; ?>]" class="inputbox">
		<option value="" <?php if($values[$readmore]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
		<option value="0" <?php if($values[$readmore]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
	
		<option value="1" <?php if($values[$readmore]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
	</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_itemrating_tip; ?>', CAPTION, '<?php echo _pi_lang_itemrating; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_itemrating; ?></span></span>
</td>
<td>
<select name="params[<?php echo $rating; ?>]" class="inputbox">
	<option value="" <?php if($values[$rating]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values[$rating]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>

	<option value="1"<?php if($values[$rating]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_authornames_tip; ?>', CAPTION, '<?php echo _pi_lang_authornames; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_authornames; ?></span></span>
</td>
<td>
<select name="params[<?php echo $author; ?>]" class="inputbox">
	<option value="" <?php if($values[$author]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values[$author]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>

	<option value="1" <?php if($values[$author]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_createdtimedate_tip; ?>', CAPTION, '<?php echo _pi_lang_createdtimedate; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_createdtimedate; ?></span></span>
</td>
<td>
<select name="params[<?php echo $createdate; ?>]" class="inputbox">
	<option value="" <?php if($values[$createdate]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values[$createdate]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>

	<option value="1" <?php if($values[$createdate]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_modifiedtimedate_tip; ?>', CAPTION, '<?php echo _pi_lang_modifiedtimedate; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_modifiedtimedate; ?></span></span>
</td>
<td>
<select name="params[<?php echo $modifydate; ?>]" class="inputbox">
	<option value="" <?php if($values[$modifydate]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values[$modifydate]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>

	<option value="1" <?php if($values[$modifydate]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<?php
//show navigation option and icon-option only in joomla 1.5
if( defined('_JEXEC') ){
//joomla 1.5
?>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_showitemnavigation_tip; ?>', CAPTION, '<?php echo _pi_lang_showitemnavigation; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_showitemnavigation; ?></span></span>
</td>
<td>
<select name="params[show_item_navigation]" class="inputbox">
	<option value="" <?php if($values['show_item_navigation']==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values['show_item_navigation']=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>

	<option value="1" <?php if($values['show_item_navigation']=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_show_icons_tip; ?>', CAPTION, '<?php echo _pi_lang_show_icons; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_show_icons; ?></span></span>
</td>
<td>
<select name="params[show_icons]" class="inputbox">
	<option value="" <?php if($values['show_icons']==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values['show_icons']=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
	<option value="1" <?php if($values['show_icons']=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<?php
}//end show navigation option and icon-option only in joomla 1.5
?>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_pdf_tip; ?>', CAPTION, '<?php echo _pi_lang_pdf; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_pdf; ?></span></span>
</td>
<td>
<select name="params[<?php echo $pdf; ?>]" class="inputbox">
	<option value="" <?php if($values[$pdf]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values[$pdf]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>

	<option value="1" <?php if($values[$pdf]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_print_tip; ?>', CAPTION, '<?php echo _pi_lang_print; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_print; ?></span></span></td>
<td>
<select name="params[<?php echo $print; ?>]" class="inputbox">
	<option value="" <?php if($values[$print]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values[$print]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>

	<option value="1" <?php if($values[$print]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_emaillink_tip; ?>', CAPTION, '<?php echo _pi_lang_emaillink; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_emaillink; ?></span></span></td>
<td>
<select name="params[<?php echo $email; ?>]" class="inputbox">
	<option value="" <?php if($values[$email]==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values[$email]=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>

	<option value="1" <?php if($values[$email]=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<?php
//show hits-option, feed_summary only in joomla 1.5
if( defined('_JEXEC') ){
//joomla 1.5
?>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_showhits_tip; ?>', CAPTION, '<?php echo _pi_lang_showhits; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_showhits; ?></span></span>
</td>
<td>
<select name="params[show_hits]" class="inputbox">
	<option value="" <?php if($values['show_hits']==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
	<option value="0" <?php if($values['show_hits']=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_no; ?></option>
	<option value="1" <?php if($values['show_hits']=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_yes; ?></option>
</select>
</td>
</tr>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_feedsummary_tip; ?>', CAPTION, '<?php echo _pi_lang_feedsummary; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_feedsummary; ?></span></span>
</td>
<td>
<select name="params[feed_summary]" class="inputbox">	
	<option value="0" <?php if($values['feed_summary']=='0'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_intro; ?></option>
	<option value="1" <?php if($values['feed_summary']=='1'){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_full; ?></option>
	<option value="" <?php if($values['feed_summary']==''){ echo "selected=\"selected\""; }?>><?php echo _pi_lang_default; ?></option>
</select>
</td>
</tr>
<?php
}//end show hits-option, feed_summary only in joomla 1.5
?>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_suffix_tip; ?>', CAPTION, '<?php echo _pi_lang_suffix; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_suffix; ?></span></span></td>
<td><input type="text" name="params[pageclass_sfx]" value="<?php echo $values['pageclass_sfx']; ?>" class="text_area" size="20"/></td>
</tr>
<?php
		//show secure-option only for joomla 1.5
		if( defined('_JEXEC') ){
			//joomla 1.5
?>
<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_secure_tip; ?>', CAPTION, '<?php echo _pi_lang_secure; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_secure; ?></span></span>
</td>
<td>
	<label><input type="radio" class="radio" name="params[secure]" value="-1" <?php if($values['secure']==-1){ echo "checked=\"checked\""; }?> /><?php echo _pi_lang_no; ?></label>
	<label><input type="radio" class="radio" name="params[secure]" value="0" <?php if($values['secure']==0){ echo "checked=\"checked\""; }?>  /><?php echo _pi_lang_ignore; ?></label>
	<label><input type="radio" class="radio" name="params[secure]" value="1" <?php if($values['secure']==1){ echo "checked=\"checked\""; }?> /><?php echo _pi_lang_yes; ?></label>	
</td>
</tr>
<?php
		//end if show secure-option only for joomla 1.5
		//show unpublished items to 'publisher'-usergroup only for joomla 1.0.x
		}else{
			//joomla 1.0.x
?>

<tr>
<td width="30%" >
<span class="editlinktip">
<span onMouseOver="return overlib('<?php echo _pi_lang_unpublisheditems_tip; ?>', CAPTION, '<?php echo _pi_lang_unpublisheditems; ?>', BELOW, RIGHT);" onMouseOut="return nd();" ><?php echo _pi_lang_unpublisheditems; ?></span></span>
</td>
<td>
	<label><input type="radio" class="radio" name="params[unpublished]" value="0" <?php if($values['unpublished']==0){ echo "checked=\"checked\""; }?> /><?php echo _pi_lang_hide; ?></label>
	<label><input type="radio" class="radio" name="params[unpublished]" value="1" <?php if($values['unpublished']==1){ echo "checked=\"checked\""; }?>  /><?php echo _pi_lang_show; ?></label>
</td>
</tr>


<?php 
		}//end if joomla 1.0.x (show unpublished items to 'publisher'-usergroup only for joomla 1.0.x)
	
?>
<tr>
<td colspan="2">
	<?php
	//hidden field for joomla 1.5 to say there are no menu-images
	if( defined('_JEXEC') ){
		//joomla 1.5
		echo '<input type="hidden" name="params[menu_image]" value="-1" />';
	}
	?>
</td>
</tr>	
			
			
		</table>
		</div>
		<div id="credits">
			<table class="adminlist" width="100%">
				<tr>
					<th colspan="2">
						<?php echo _pi_lang_credits; ?>
					</th>
				</tr>
				<tr>
					<td>
						Michael Struller
					</td>
					<td>
						Joomfish compatibility<br />
						fix bugs<br />
						update German language file
					</td>
				</tr>
				<tr>
					<td>
						Lars Vonnahme
					</td>
					<td>
						added show/hide page properties<br />
						update German language file
					</td>
				</tr>
				<tr>
					<td>
						<a href="http://www.cullenlogan.com" target="_blank">Cullen Logan</a>
					</td>
					<td>
						fix bugs<br />
						the PHP itemtype-code
					</td>
				</tr>
				<tr>
					<td>
						<a href="http://www.easyteneweb.com/" target="_blank">Per Kersoe</a>
					</td>
					<td>
						Danish translation 
					</td>
				</tr>
				<tr>
					<td>
						Matthias Dwidjosiswojo
					</td>
					<td>
						German translation 
					</td>
				</tr>
				<tr>
					<td>
						<a href="http://www.re-media.ro" target="_blank">Razvan Rosca</a>
					</td>
					<td>
						Romanian translation 
					</td>
				</tr>
				<tr>
					<td>
						Athena Maliora
					</td>
					<td>
						Greek translation 
					</td>
				</tr>	
				<tr>
					<td>
						Rogelio Herrer&iacute;as Hern&aacute;ndez
					</td>
					<td>
						Spanish translation 
					</td>
				</tr>	
				<tr>
					<td>
						Kiril Pamporov (nf1)
					</td>
					<td>
						Bulgarian translation 
					</td>
				</tr>
				<tr>
					<td>
						<a href="http://www.dazzleweb.com.br" target="_blank">Thiago Estrela</a>
					</td>
					<td>
						Brazilian-portuguese translation 
					</td>
				</tr>
				<tr>
					<td>
						Michael Lasevich
					</td>
					<td>						
						code improvement render engine
					</td>
				</tr>
				<tr>
					<td>
						Huang Wei
					</td>
					<td>						
						Chinese translation
					</td>
				</tr>
				<tr>
					<td>
						<a href="http://www.picoseuropa.info" target="_blank">Juan C. Iglesias</a>
					</td>
					<td>						
						update Spanish translation
					</td>
				</tr>
				<tr>
					<td>
						<a href="http://www.system34.com" target="_blank">Lidija Ajranovic</a>
					</td>
					<td>						
						Serbian translation
					</td>
				</tr>
				<tr>
					<td>
						Carsten Engel
					</td>
					<td>						
						main developer
					</td>
				</tr>					
			</table>		
		</div>
		<div id="joomfish">
			<table class="adminlist" width="100%">				
			<tr>
				<th colspan="2">					
					Joom!Fish
				</th>	
			</tr>
			<tr>
				<td colspan="2">
					<p>				
						<?php echo _pi_lang_joomfish_info1; ?>
						<br />
						<a href="http://extensions.joomla.org/extensions/languages/multi-lingual-content/460" target="_blank"><?php echo _pi_lang_joomfish_jed; ?></a>
						<br />					
						<a href="http://www.joomfish.net/" target="_blank">www.joomfish.net</a>
					</p>
					<p>
						<?php echo _pi_lang_joomfish_info2; ?>
					</p>
					<p>
						<?php echo _pi_lang_joomfish_info3; ?>
						<br />	
						<a href="http://gecko.struller.de/" target="_blank">gecko.struller.de</a>
					</p>
										
				</td>
			</tr>			
			</table>
		</div>	
		<div id="acesef">
			<table class="adminlist" width="100%">				
			<tr>
				<th colspan="3">					
					Acesef
				</th>	
			</tr>
			<tr>
				<td>
				<?php echo _pi_lang_status_acesef; ?>
				</td>
				<td colspan="2">
				<?php
						if(file_exists(dirname(__FILE__).'/../../com_acesef/acesef.php')){
							echo '<span style="color: #5F9E30;">'._pi_lang_acesef_installed.'</span>';
						}else{
							echo '<span style="color: red;">'._pi_lang_acesef_not_installed.'</span>';
						}
					?>
				</td>				
			</tr>
			<tr>		
				<td width="200">
					<?php echo _pi_lang_create_sef_urls; ?>						
				</td>
				<td width="400">
					<?php
					//just to keep the error of undefined index out of the checkbox after upgrade
					$create_sef_urls = 0;
					if($class_pi->pi_config['create_sef_urls']){
						$create_sef_urls = 1;
					}
					?>
					<input type="checkbox" name="create_sef_urls" value="true" <?php if($create_sef_urls){echo 'checked="checked"';} ?> />	<?php echo _pi_lang_create_sef_urls_info; ?>.						
				</td>
				<td>
					<strong>
					<?php echo _pi_lang_format; ?>
					</strong>
					<br /><br />
					category-alias/234-article-alias.html
					<br /><br />
					<?php
					//just to keep the error of undefined index out of the checkbox after upgrade
					$sef_url_cat = 0;
					if($class_pi->pi_config['sef_url_cat']){
						$sef_url_cat = 1;
					}
					?>
					<input type="checkbox" name="sef_url_cat" value="true" <?php if($sef_url_cat){echo 'checked="checked"';} ?> />	
					<?php 
					if(defined('_JEXEC')){
						//joomla 1.5
						echo JText::_( 'CATEGORY' ).' '.JText::_( 'ALIAS' );
					}else{
						//joomla 1.0.x
						echo 'category alias';
					}
					
					
					//just to keep the error of undefined index out of the checkbox after upgrade
					$sef_url_id = 0;
					if($class_pi->pi_config['sef_url_id']){
						$sef_url_id = 1;
					} 
					?>
					<br />	
					<input type="checkbox" name="sef_url_id" value="true" <?php if($sef_url_id){echo 'checked="checked"';} ?> />	
					<?php 
					if(defined('_JEXEC')){
						//joomla 1.5
						echo _pi_lang_article.' '.JText::_( 'ID' ); 
					}else{
						//joomla 1.0.x
						echo 'article id';
					}
					
					
					//just to keep the error of undefined index out of the checkbox after upgrade
					$sef_url_ext = '';
					if($class_pi->pi_config['sef_url_ext']){
						$sef_url_ext = $class_pi->pi_config['sef_url_ext'];
					} 
					?>
					<br />	
					<?php 
					echo _pi_lang_sef_url_suffix; 
					?>
					: <input type="text" name="sef_url_ext" value="<?php echo $sef_url_ext; ?>" />	
														 
				</td>
			</tr>
			<tr>
				<td colspan="3">
					
										
				</td>
			</tr>			
			</table>
		</div>			
	</form>		
</div>

<?php $class_pi->display_footer(); ?>